<?php
/**
 * ---------------------------------------------------
 * 网站入口
 * ---------------------------------------------------
 * @author  Midnight(杨云洲),  yangyunzhou@foxmail.com
 * ---------------------------------------------------
 * @copyright  Midnight Studio
 * ---------------------------------------------------
 */
header('content-type;text/html;charset=utf-8');

// 内核初始化
$pathinfo = pathinfo($_SERVER['PHP_SELF']);
$pathinfo['dirname'] = preg_replace("/[\\\]{1,}/", '/', $pathinfo['dirname']);
$pathinfo['dirname'] = ($pathinfo['dirname'] == '/') ? false : $pathinfo['dirname'] . '/';

// 设置网站相对路径
define('ROOT', $pathinfo['dirname']);

// 设置网站绝对路径
define('R_E', preg_replace("/[\\\]{1,}/", '/', dirname(__FILE__) . '/'));

// 保护目录
define('BUILD_DIR_SECURE', TRUE);
define('DIR_SECURE_FILENAME', 'index.html');
define('DIR_SECURE_CONTENT', 'Deney Access!');

// 初始化项目
define('MID_APP', true);
define('APP_NAME', 'App');
define('APP_PATH', 'App');
include_once (APP_PATH.'/ThinkPHP/ThinkPHP.php');
$App = new App();
$App->run();
?>